# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=novahot
pkgver=23.69857bb
pkgrel=1
pkgdesc='A webshell framework for penetration testers.'
groups=('blackarch' 'blackarch-webapp')
arch=('any')
url='https://github.com/chrisallenlane/novahot'
license=('BSD')
depends=('nodejs')
makedepends=('git' 'npm')
source=("git+https://github.com/chrisallenlane/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  _npmdir="$pkgdir/usr/lib/node_modules/"

  install -dm 755 $_npmdir

  cd $_npmdir

  npm install --user root -g --prefix "$pkgdir/usr" novahot@

  cd "$srcdir/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" README.md CONTRIBUTING.md
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

